package expressions.slogo;

import java.util.List;
import parsing.Token;

/**
 * Returns whether the pen is down or not.
 */
@Token(regex = "pendownp|pendown\\?")
public class PenDownP extends TurtleCommand
{

    public PenDownP()
    {
        super(0);
    }

    @Override
    protected Double combineResults(List<Double> results, ITurtleContext context)
    {
        return BooleanConstant.toDouble(context.getTurtle().getPen()
                .isPenDown());
    }

}
